Expression::Application.routes.draw do

  
  get "email/remind"

  get "avatar/index"

  get "avatar/upload"

  get "avatar/delete"

  get "community/index"

  get "community/browse"

  get "community/search"

  get "faq/index"

  get "faq/edit"

  get "spec/index"

  get "spec/edit"

  get "profile/index"

  get "profile/show"

  get "user/index"

  get "user/register"

  get "site/index"

  get "site/about"

  get "site/help"

  get "user/login"

  get "user/logout"

  get "user/edit"

  get "user_mailer/welcome_email"

  post "user/register"

  post "user/login"

  post "user/edit"

  post "spec/edit"

  post "faq/edit"

  post "community/index"

  post "community/search"

  post "avatar/upload"

  post "email/remind"

  #Define Rest Resource
  resources :blogs do
    resources :posts do
      resources :comments
    end
  end

  # The priority is based upon order of creation:
  # first created -> highest priority.

  # Sample of regular route:
  #   match 'products/:id' => 'catalog#view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Sample resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Sample resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Sample resource route with more complex sub-resources
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', :on => :collection
  #     end
  #   end

  # Sample resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end

  # You can have the root of your site routed with "root"
  # just remember to delete public/index.html.
  # root :to => 'welcome#index'

  root :to => 'site#index'

  # match'', :controller => 'site', :action => 'index', :id => nil
  resources :user
  match '/register', :to => 'user#register'
  match '/about', :to => 'user#about'
  match '/help', :to => 'user#help'
  match '/login', :to =>'user#login'
  match '/edit', :to =>'user#edit'
  match '/user/welcome_email', :to => 'user#create'

  #resources :profile
  #match '/show', :to => 'profile#show'

  # Install the default route as the lowest priority.
  match ':controller/:action/:id'
  match 'profile',  :to => 'profile#show', :as => "profile"
  match 'hub', :to => 'user#index', :as => 'hub'

  ##Change Route pagina 343
  # You can have the root of your site routed by hooking up ''
  # -- just remember to delete public/index.html.
  match '', :controller => 'site', :action => 'index', :id => nil
###

#match'', :controller => 'user', :action => 'about', :id => nil
#match'', :controller => 'user', :action => 'help', :id => nil

# See how all your routes lay out with "rake routes"

# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id(.:format)))'
end
